package com.zf.zf_demo.converter;

import com.zf.zf_demo.dao.Student;
import com.zf.zf_demo.dto.StudentDTO;

public class StudentConverter {
    public static StudentDTO studentDTO(Student student) {
        StudentDTO studentDTO=new StudentDTO();
        studentDTO.setId(student.getId());
        studentDTO.setName(studentDTO.getName());
        studentDTO.setAge(studentDTO.getAge());
        studentDTO.setEmail(studentDTO.getEmail());
        return studentDTO;
    }
    public static Student studentDTO(StudentDTO studentDTO) {
        Student student=new Student();
        student.setName(studentDTO.getName());
        student.setEmail(studentDTO.getEmail());
        student.setAge(studentDTO.getAge());
        return student;


    }
}
